
library(ExPosition)

data(french.social)
social.res <- epPCA(french.social$data)

sing.vals <- social.res$ExPosition.Data$pdq$Dv

row.fs <- social.res$ExPosition.Data$fi

#row.fs.t.values <- matrix(0,nrow(row.fs),length(sing.vals))
row.fs.t.values <- matrix(0,nrow(row.fs),ncol(row.fs))


#factor score / (singular value / sqrt(oservations))
#row.fs[1,1] / (sing.vals[1]/sqrt(nrow(row.fs)))

for(i in 1:nrow(row.fs)){
	#print(i)
	for(j in 1:ncol(row.fs)){
		#print(j)
		#row.fs.t.values[i,j] <- row.fs[i,j] / (sing.vals[j]/sqrt(nrow(row.fs)))
		row.fs.t.values[i,j] <- t.test.v1(X=row.fs[i,j],m=0,sd=sing.val[j],N=nrow(row.fs))
		print(row.fs.t.values)
		pause()
	}
	#print(t.val)
}
